// namespace tools {

// 	export class longConnector {
// 		private $dispatcher: hjc.IDispacher;
// 		private $next: Function;

// 		private static $instance: tools.longConnector;
// 		private constructor() { };
// 		public static get instance(): tools.longConnector {
// 			if (!this.$instance) {
// 				this.$instance = new tools.longConnector();
// 				tools.websocket.instance.
// 					setConnections(this.$instance, this.$instance.dispath,
// 					this.$instance.next, this.$instance.reconnect);
// 			}
// 			return this.$instance;
// 		}

// 		public connect(): void {
// 			tools.websocket.instance.toConntect();
// 		}

// 		public get dispatcher(): hjc.IDispacher { return this.$dispatcher; }
// 		public set dispatcher(dispatcher: hjc.IDispacher) { this.$dispatcher = dispatcher; }

// 		public setNext(next: Function): tools.longConnector {
// 			this.$next = next;
// 			return this;
// 		}

// 		public send(msg: hjc.Message): void {
// 			//遮罩器/
// 			tools.websocket.instance.send(msg);
// 		}

// 		public next(): void {
// 			if (isFunc(this.$next)) this.$next();
// 		}

// 		private reconnect(msg: hjc.Message): void {
// 			// Sender.con.reconnect();
// 		}

// 		private dispath(msg: hjc.Message): void {
// 			//解遮器
// 			if (this.$dispatcher) this.$dispatcher.handler(msg);
// 		}
// 	}
// }